package com.tf.temper.service.impl;

import com.tf.temper.dao.DeviceDao;
import com.tf.temper.entity.DeviceEntity;
import com.tf.temper.service.DeviceService;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ccssoft.m8.common.ccssoft.modules.util.EntityWrapperHandle;
import com.ccssoft.m8.common.ccssoft.modules.util.PageUtils;
import com.ccssoft.m8.common.ccssoft.modules.util.Query;


@Service("deviceService")
public class DeviceServiceImpl extends ServiceImpl<DeviceDao, DeviceEntity> implements DeviceService<DeviceEntity>
{
    public PageUtils<DeviceEntity> queryPage(Map<String, Object> params)
    {
        EntityWrapperHandle<DeviceEntity> ew = new EntityWrapperHandle<DeviceEntity>(params);
        Page<DeviceEntity> page = this.selectPage(new Query<DeviceEntity>(params).getPage(),ew);
        page.setTotal(this.selectCount(ew));
        return new PageUtils<DeviceEntity>(page);
    }

    public List<DeviceEntity> queryPageByLike(Map<String, Object> params)
    {
        return baseMapper.queryPageByLike(params);
    }
}
